import execjs
import requests

res = requests.post("https://www.endata.com.cn/API/GetData.ashx", data={
    "year": "2022",
    "MethodName": "BoxOffice_GetYearInfoData"
})
print(res.text)

with open("prase.js", "r", encoding="utf8") as f:
    content = f.read()
    js_code = execjs.compile(content)
    r = js_code.call("get_webInstance", res.text)
    for item in r['Data']['Table']:
        print(item)
